<div class="pri-news table">
            	<h2>Tin nhắn <span><a href="<?php echo Yii::app()->createUrl('user/inbox/'); ?>">Xem tất cả</a></span></h2>
                <?php foreach($model as $value): ?>
             <table cellpadding="3" cellspacing="3" border="0" width="100%">
              <?php if($value->status == 1): ?>
                  <tr class="new1">
                 	<td width="15%"><?php echo $value->name; ?></td>
                    <td><a href="<?php echo Yii::app()->createUrl('user/inbox/view',array('id'=> $value->id)); ?>"><?php echo $value->content; ?></a></td>
                    <td width="15%"><?php 
                        $date = new DateTime($value->date);
                        echo $date->format('d-m-Y');
                    ?></td>
                  </tr>
                <?php else: ?>
                <tr class="new">
                  <td width="15%"><?php echo $value->name; ?></td>
                    <td><a href="<?php echo Yii::app()->createUrl('user/inbox/view',array('id'=> $value->id)); ?>"><?php echo $value->content; ?></a></td>
                    <td width="15%"><?php 
                        $date = new DateTime($value->date);
                        echo $date->format('d-m-Y');
                    ?></td>
                  </tr>
              <?php endif; ?>
                </table>
                  <?php endforeach; ?>
            </div>